<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('潜在客户列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="btn-group-sm" id="toolbar" role="group">
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('business:customer:edit')}]];
    var removeFlag = [[${@permission.hasPermi('business:customer:remove')}]];
    var customerId = [[${customerId}]];
    var customerName= [[${customerName}]];
    var prefix = ctx + "business/customer";

    $(function() {
        var options = {
            url: prefix + "/showGotoCustomerHistory?customerId=" + customerId,
            removeUrl: prefix + "/removeFlag",
            modalName: "潜在客户",
            columns: [{
                checkbox: true
            },
                {
                    field: 'customerName',
                    title: '客户名称',
                },
                {
                    field: 'chatInformation',
                    title: '备注信息'
                },
                {
                    field: 'followUpTime',
                    title: '跟进时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>

</body>
</html>